using System;
using System.Collections.Generic;
using System.Linq;
using MathematicallySafe.HeadCounter.Data;
using MathematicallySafe.HeadCounter.Data.Common;
using MathematicallySafe.HeadCounter.Data.Models;
using StructureMap;

namespace MathematicallySafe.HeadCounter.ViewModels
{
    public class RaiderViewModel : ViewModelBase
    {
        protected static readonly IHeadCounterService HeadCounterService = ObjectFactory.GetInstance<IHeadCounterService>();
        protected Raider _raider;

        public Raider Model
        {
            get { return _raider; }
        }

        public string Name
        {
            get { return _raider.Name; }
        }

        public CharacterClass Class
        {
            get { return _raider.Class; }
        }

        public CharacterRace Race
        {
            get { return _raider.Race; }
        }

        public DateTime Joined
        {
            get { return _raider.Joined; }
        }

        public bool IsInactive
        {
            get { return Model.IsInactive; }
            set
            {
                Model.IsInactive = value;
                OnPropertyChanged("IsInactive");
            }
        }

        public RaiderViewModel(Raider raider)
        {
            _raider = raider;
            Initialise();
        }
    }
}